<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>
<div id="app">
    <button v-on:click="alertMsg">seen</button>
    <input v-model="msg" v-on:keyup.13="alertMsg">
    <input v-model="msg" v-on:keyup.enter="alertMsg">
</div>
<script src="vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            msg: "My name is LZUGIS"
        },
        methods:{
            alertMsg: function(event){
                if(event)event.preventDefault();
                this.msg +="!";
                alert(this.msg);
            }
        }
    });
</script>
</body>
</html>